package com.baiytfp.hf.HFDataExchange.action.service;

import com.baiytfp.hf.HFDataExchange.action.dao.OperateRecordDAOImpl;
import com.baiytfp.hf.HFDataExchange.common.model.base.HFSysParams;
import com.baiytfp.hf.HFDataExchange.common.model.table.Operate_record;
import com.baiytfp.hf.baiytfp.common.db.HFPager;
import com.baiytfp.hf.baiytfp.common.util.DateUtil;
import com.baiytfp.hf.baiytfp.framework.base.BaseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 操作记录
 */
@Service
public class OperateRecordService extends BaseService {
    @Resource(name= HFSysParams.DB_TYPE + "OperateRecordDAOImpl")
    private OperateRecordDAOImpl operateRecordDAO;

    public List<Map> getList(HFPager hfPager) throws Exception {
        return operateRecordDAO.getList(hfPager);
    }

    public long add(Operate_record record) throws Exception {
		record.setRecord_time(DateUtil.getCurrentDT());
        return operateRecordDAO.add(record);
    }
    public long update(Operate_record record) throws Exception {
        return operateRecordDAO.update(record);
    }

    public Operate_record get(String id) throws Exception {
        return operateRecordDAO.get(id);
    }

}
